#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)

#include <stdio.h>
#include <assert.h>

char* my_strcpy(char* destination, const char* source)
{
	char* ret = destination;
	assert(destination != NULL);
	assert(source != NULL);

	//while (*source != '\0')
	//{
	//	/*
	//	*destination = *source;
	//	source++;
	//	destination++;
	//	*/
	//	//*destination++ = *source++;
	//}
	//*destination = '\0';

	while (*destination++ = *source++)
	{
		;
	}
	return ret;
}

int main()
{
	char str1[20] = "zhao";
	char str2[20] = "\0";
	char* p = NULL;
	p = my_strcpy(str2, str1);
	printf("%s\n", p);
	
	return 0;
}